﻿@section header
{
    <link rel="stylesheet" href="/css/treetable.css" />
}
<blockquote class="layui-elem-quote news_search toolList">
    @Html.Action("MenuHeader", "Home")
</blockquote>

<div style="display: flex;">
    <ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
    <table class="layui-table"
           lay-data="{height: 'full-80', page:true, id:'mainList'}"
           lay-filter="list" lay-size="sm">
        <thead>
            <tr>
                <th lay-data="{checkbox:true, fixed: true}"></th>
                <th lay-data="{field:'Id', width:150}">表单模板Id</th>
                <th lay-data="{field:'Name', width:150}">表单名称</th>
                <th lay-data="{field:'Fields', width:150}">字段个数</th>
                <th lay-data="{field:'ContentData', width:150}">表单中的字段数据</th>
                <th lay-data="{field:'FrmDbId', width:150}">关联的数据库</th>
                <th lay-data="{field:'Enabled', width:150}">有效</th>
                <th lay-data="{field:'Description', width:150}">备注</th>
                <th lay-data="{field:'CreateDate', width:150}">创建时间</th>
                <th lay-data="{field:'ModifyDate', width:150}">修改时间</th>
                <th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
            </tr>
        </thead>
    </table>
</div>
<script type="text/html" id="barList">
    <a class="layui-btn layui-btn-primary layui-btn-mini" lay-event="detail">查看</a>
</script>

<!--用户添加/编辑窗口-->
<div id="divEdit" style="display: none">
    <form class="layui-form" action="" id="formEdit">
        <input type="hidden" name="Id" v-model="Id" />
        <input type="hidden" name="Fields" id="Fields" value="0">

        <div class="layui-row">
            <div class="layui-tab layui-tab-brief" lay-filter="tab">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本信息</li>
                    <li>表单设计</li>
                </ul>
                <div class="layui-tab-content" style="height: 100px;">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-form-item">
                            <label class="layui-form-label">表单名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="Name" v-model="Name" required lay-verify="required"
                                       placeholder="表单名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">关联数据表名称【英文】</label>
                            <div class="layui-input-block">
                                <input type="text" name="FrmDbId" v-model="FrmDbId" required lay-verify="required"
                                       placeholder="关联数据表名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">排序码</label>
                            <div class="layui-input-block">
                                <input type="text" name="SortCode" value="1" v-model="SortCode" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-block">
                                <input type="text" name="Description" v-model="Description"
                                       placeholder="备注" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                    </div>
                    <div class="layui-tab-item">
                        <div class="layui-row">
                            <blockquote class="layui-elem-quote">
                                提醒：单选框和复选框，如：{|-选项-|}两边边界是防止误删除控件，程序会把它们替换为空，请不要手动删除！
                            </blockquote>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <ul class="layui-nav" style="margin-right: 5px;">
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('text');">文本框</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('textarea');">多行文本</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('select');">下拉菜单</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('radios');">单选框</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('checkboxs');" class="btn btn-link">复选框</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('macros');" class="btn btn-link">宏控件</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('progressbar');" class="btn btn-link">进度条</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('qrcode');" class="btn btn-link">二维码</a></li>
                                    <li class="layui-nav-item" style="line-height: 40px"><a href="javascript:void(0);" onclick="leipiFormDesign.exec('listctrl');" class="btn btn-link">列表控件</a></li>
                                </ul>
                            </div>
                            <div class="layui-col-xs9">
                                <script id="myFormDesign" type="text/plain" style="width: 100%;">
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-row">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" charset="utf-8" src="/js/ueditor/ueditor.config.js?2023"></script>
<script type="text/javascript" charset="utf-8" src="/js/ueditor/ueditor.all.js?2023"> </script>
<script type="text/javascript" charset="utf-8" src="/js/ueditor/lang/zh-cn/zh-cn.js?2023"></script>
<script type="text/javascript" charset="utf-8" src="/js/ueditor/formdesign/leipi.formdesign.v4.js?2023"></script>

<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/userJs/forms.js?v4"></script>


